package ssm.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import ssm.entity.User;
import ssm.serviceImpl.UserServiceImpl;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * Created by lu on 2017/6/24.
 */
@Controller
@RequestMapping(value = "user")
public class UserController {

    @Autowired
    private UserServiceImpl userService;

    /**
     * 测试接口
     * @return
     */
    @RequestMapping(value = "userInfo")
    @ResponseBody
    public Map<String, Object> selectUserById() {
        Map<String, Object> map = new HashMap<String, Object>();
        map.put("user", userService.selectUserById(1L));
        List list = new ArrayList();
        return map;
    }
}
